﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

using System.Data;

namespace POI.eTransmittal.Enitity
{
    public class AccessRights
    {
        public const string VIEW_INCOMING_TRANSMITTAL = "View Incoming Transmittal";
        public const string VIEW_OUTGOING_TRANSMITTAL = "View Outgoing Transmittal";
        public const string MODIFY_OWNED_INCOMING_TRANSMITTAL = "Modify Owned Incoming Transmittal";
        public const string MODIFY_OWNED_OUTGOING_TRANSMITTAL = "Modify Owned Outgoing Transmittal";
        public const string MODIFY_OTHER_INCOMING_TRANSMITTAL = "Modify Other Incoming Transmittal";
        public const string MODIFY_OTHER_OUTGOING_TRANSMITTAL = "Modify Other Outgoing Transmittal";
        public const string MANAGE_USER_PROFILE = "Manage User Profile";
        public const string MANAGE_SYSTEM_SETTINGS = "Manage System Settings";

        public static DataTable GetList()
        {
            string[] accessRights = new string[] {AccessRights.MANAGE_USER_PROFILE, AccessRights.MANAGE_SYSTEM_SETTINGS, AccessRights.VIEW_INCOMING_TRANSMITTAL, AccessRights.VIEW_OUTGOING_TRANSMITTAL, AccessRights.MODIFY_OWNED_INCOMING_TRANSMITTAL,
                AccessRights.MODIFY_OWNED_OUTGOING_TRANSMITTAL, AccessRights.MODIFY_OTHER_INCOMING_TRANSMITTAL, AccessRights.MODIFY_OTHER_OUTGOING_TRANSMITTAL};
        
            DataTable dt = new DataTable("AccessRights");
            dt.Columns.Add("AccessRight");

            foreach (string ar in accessRights)
            {
                DataRow r = dt.NewRow();
                r["AccessRight"] = ar;

                dt.Rows.Add(r);
            }

            dt.AcceptChanges();

            return dt;
        }
    }
}
